package com.hflyeer.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * DefaultViewConfig
 *
 * @author hflyeer
 * @date 2021-06-01
 * @describe 启动默认展示页面
 */
@Configuration
public class DefaultViewConfig implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("redirect:/swagger-ui.html#/");

        registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
    }
}
